package models

import "time"

var NewNoticeType map[int]string

// 新通知
type NewNotice struct {
	Id              int64     `orm:"description(自增主键)"`
	User            *User     `orm:"rel(fk);null;default(0);description(发通知人Id)" json:"-"`
	Student         *Student  `orm:"rel(fk);null;default(0);description(学生Id)" json:"-"`
	Type            int       `orm:"description(通知类型，0未知 1门禁通知 2校车通知 3作业通知 4会议通知 5成绩通知 6课程通知)"`
	TypeShow        string    `orm:"-"`
	Created         time.Time `orm:"auto_now_add;type(datetime);description(创建时间)" json:"-"`
	CreateShowIndex string    `orm:"-"`
	SchoolName      string    `orm:"-"`
	StudentName     string    `orm:"-"`
	MiniUrl         string    `orm:"-"`
}

func init() {
	NewNoticeType = map[int]string{
		0: "未知",
		1: "门禁通知",
		2: "校车通知",
		3: "作业通知",
		4: "会议通知",
		5: "成绩通知",
		6: "课程通知",
	}
}
